import Layout from '@/views/layout/frame/Layout.vue'

export default [
  // 运营驾驶舱
  {
    name: 'home',
    path: '/home',
    component: Layout,
    hidden: false,
    meta: {
      title: '运营驾驶舱',
      icon: 'iconfont icon-shouye',
      roles: ['CUSTOMER_USER', 'TENANT_ADMIN']
    },
    children: [
      {
        path: 'index',
        name: 'shuiwuScreen',
        component: () => import('@/views/largeScreen/shuiwu.vue'),
        meta: {
          title: '大屏监控',
          icon: 'iconfont icon-shouye',
          roles: ['CUSTOMER_USER', 'TENANT_ADMIN']
        }
      },
      {
        path: 'largeScreen',
        name: 'largeScreen',
        component: () => import('@/views/largeScreen/largeScreen.vue'),
        meta: {
          title: '领导驾驶舱',
          icon: 'iconfont icon-shouye',
          roles: ['CUSTOMER_USER', 'TENANT_ADMIN']
        }
      },
      {
        path: 'gongyi',
        name: 'gongyi',
        component: () => import('@/views/largeScreen/gongyiScreen.vue'),
        meta: {
          title: '工艺流程图',
          icon: 'iconfont icon-shouye',
          roles: ['CUSTOMER_USER', 'TENANT_ADMIN']
        }
      }
    ]
  },
  // 数据查看
  {
    path: '/data',
    component: Layout,
    hidden: false,
    alwaysShow: true,
    name: 'data',
    meta: {
      title: '数据监测',
      icon: 'iconfont icon-shujufenxi',
      roles: ['CUSTOMER_USER', 'TENANT_ADMIN']
    },
    children: [
      {
        path: 'monitoring',
        name: 'dataMonitoring',
        meta: { title: '数据监测', icon: 'iconfont icon-shujufenxi' },
        component: () => import('@/views/dataMonitoring/index.vue')
      },
      {
        path: 'realTime',
        name: 'realTimeData',
        meta: { title: '实时数据', icon: 'iconfont icon-shujufenxi' },
        component: () => import('@/views/dataMonitoring/realTime.vue')
      },
      {
        path: 'history',
        name: 'historyData',
        meta: { title: '历史数据', icon: 'iconfont icon-shujufenxi' },
        component: () => import('@/views/dataMonitoring/history.vue')
      }
    ]
  },
  // 设备管理
  {
    path: '/DTU',
    component: Layout,
    hidden: false,
    alwaysShow: true,
    name: 'DTUDevice',
    meta: {
      title: '设备管理',
      icon: 'iconfont icon-shebei',
      roles: ['CUSTOMER_USER', 'TENANT_ADMIN']
    },
    children: [
      {
        path: 'index',
        name: 'DTUDevice',
        meta: { title: 'DTU设备', icon: 'iconfont icon-shebei' },
        component: () => import('@/views/device/DTUHost.vue')
      },
      {
        path: 'DTU',
        name: 'DTUProtocol',
        meta: { title: 'DTU协议', icon: 'iconfont icon-shebei' },
        component: () => import('@/views/protocol/DTUProtocol.vue')
      },
      {
        path: 'QrCode',
        name: 'deviceQrCode',
        meta: { title: '设备二维码', icon: 'iconfont icon-shebei' },
        component: () => import('@/views/device/deviceQrCode.vue')
      }
    ]
  },
  // 管道管理
  {
    path: '/pipeLine',
    component: Layout,
    hidden: false,
    meta: {
      title: '管道管理',
      icon: 'iconfont icon-shebei',
      roles: ['CUSTOMER_USER', 'TENANT_ADMIN', 'SYS_ADMIN']
    },
    children: [
      {
        path: 'info',
        name: 'pipeInfo',
        component: () => import('@/views/pipeLineManage/pipeInfo.vue'),
        meta: {
          title: '管道信息',
          icon: 'iconfont icon-shebei',
          roles: ['CUSTOMER_USER', 'TENANT_ADMIN', 'SYS_ADMIN']
        }
      },
      {
        path: 'node',
        name: 'pipeNode',
        component: () => import('@/views/pipeLineManage/pipeNode.vue'),
        meta: {
          title: '管道节点',
          icon: 'iconfont icon-shebei',
          roles: ['CUSTOMER_USER', 'TENANT_ADMIN', 'SYS_ADMIN']
        }
      }
    ]
  },
  // 报警监控
  {
    path: '/alarm',
    component: Layout,
    hidden: false,
    alwaysShow: true,
    name: 'alarm',
    meta: {
      title: '报警监控',
      icon: 'iconfont icon-baojingzhongxin-',
      roles: ['CUSTOMER_USER', 'TENANT_ADMIN']
    },
    children: [
      {
        path: 'alarmSetting',
        name: 'alarmSetting',
        meta: { title: '告警设置', icon: 'iconfont icon-baojingzhongxin-' },
        component: () => import('@/views/alarmManage/alarmSettings.vue')
      },
      {
        path: 'realTime',
        name: 'realTimeAlarm',
        meta: { title: '实时告警', icon: 'iconfont icon-baojingzhongxin-' },
        component: () => import('@/views/alarmManage/realTimeAlarm.vue')
      },
      {
        path: 'history',
        name: 'historyAlarm',
        meta: { title: '历史告警', icon: 'iconfont icon-baojingzhongxin-' },
        component: () => import('@/views/alarmManage/historyAlarm.vue')
      }
    ]
  },
  // 组态管理
  {
    path: '/scada',
    component: Layout,
    hidden: false,
    meta: {
      roles: ['CUSTOMER_USER', 'TENANT_ADMIN']
    },
    children: [
      {
        path: 'index',
        name: 'scada',
        component: () => import('@/views/scadaManage/index.vue'),
        meta: {
          title: '云组态SCADA',
          icon: 'iconfont icon-zutai',
          roles: ['CUSTOMER_USER', 'TENANT_ADMIN']
        }
      }
    ]
  },
  // 视频监控
  {
    path: '/video',
    component: Layout,
    hidden: true,
    alwaysShow: true,
    name: 'video',
    meta: {
      title: '视频监控',
      icon: 'iconfont icon-camera',
      roles: ['CUSTOMER_USER', 'TENANT_ADMIN']
    },
    children: [
      {
        path: 'realTimeVideo',
        name: 'realTimeVideo',
        meta: { title: '监控中心', icon: 'iconfont icon-camera' },
        component: () => import('@/views/videoManage/realTimeVideo.vue')
      },
      {
        path: 'videoManage',
        name: 'videoManage',
        meta: { title: '摄像头管理', icon: 'iconfont icon-camera' },
        component: () => import('@/views/videoManage/index.vue')
      }
    ]
  },
  // 外勤巡检管理
  {
    path: '/patrol',
    component: Layout,
    hidden: false,
    alwaysShow: true,
    name: 'patrol',
    meta: {
      title: '外勤巡检管理',
      icon: 'iconfont icon-xunjianguanli',
      roles: ['CUSTOMER_USER', 'TENANT_ADMIN']
    },
    children: [
      {
        path: 'task',
        name: 'patrolTask',
        meta: { title: '计划巡检任务', icon: 'iconfont icon-xunjianguanli' },
        component: () => import('@/views/patrolDeal/task.vue')
      },
      {
        path: 'current',
        name: 'patrolCurrent',
        meta: { title: '当天巡检任务', icon: 'iconfont icon-xunjianguanli' },
        component: () => import('@/views/patrolDeal/current.vue')
      },
      {
        path: 'history',
        name: 'patrolHistory',
        meta: { title: '历史巡检报表', icon: 'iconfont icon-xunjianguanli' },
        component: () => import('@/views/patrolDeal/history.vue')
      },
      {
        path: 'stepStore',
        name: 'patrolStepStore',
        meta: { title: '巡检标准库', icon: 'iconfont icon-xunjianguanli' },
        component: () => import('@/views/patrolDeal/stepStore.vue')
      }
    ]
  },
  // 系统设置
  {
    path: '/sys',
    component: Layout,
    hidden: false,
    alwaysShow: true,
    name: 'sys',
    meta: {
      title: '系统设置',
      icon: 'iconfont icon-shezhi',
      roles: ['CUSTOMER_USER', 'TENANT_ADMIN']
    },
    children: [
      {
        path: 'userManage',
        name: 'userManage',
        component: () => import('@/views/userManage/index.vue'),
        meta: {
          title: '用户管理',
          icon: 'iconfont icon-shezhi',
          roles: ['CUSTOMER_USER', 'TENANT_ADMIN']
        }
      },
      {
        path: 'roleManage',
        name: 'roleManage',
        component: () => import('@/views/roleManage/index.vue'),
        meta: {
          title: '角色管理',
          icon: 'iconfont icon-shezhi',
          roles: ['CUSTOMER_USER', 'TENANT_ADMIN']
        }
      },
      {
        path: 'loginLog',
        name: 'loginLog',
        component: () => import('@/views/dailyLog/loginLog.vue'),
        meta: {
          title: '登录日志',
          icon: 'iconfont icon-shezhi',
          roles: ['CUSTOMER_USER', 'TENANT_ADMIN']
        }
      },
      {
        path: 'operationLog',
        name: 'operationLog',
        component: () => import('@/views/dailyLog/operationLog.vue'),
        meta: {
          title: '操作日志',
          icon: 'iconfont icon-shezhi',
          roles: ['CUSTOMER_USER', 'TENANT_ADMIN']
        }
      },
      {
        path: 'sysSetting',
        name: 'sysSetting',
        component: () => import('@/views/sysManage/sysSetting.vue'),
        meta: {
          title: '界面配置',
          icon: 'iconfont icon-shezhi',
          roles: ['CUSTOMER_USER', 'TENANT_ADMIN']
        }
      }
    ]
  }
]

